// eduNews/eduCom/multiple/multipe.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
   choiceArray:{
     type:Array,
     value:[
       {
         title:'推荐',
         id:'tuijian'
       },
       {
         title:'热度',
         id:'redu'      
       },
       {
         title:'小学',
         id:'xiaoxue'
       },
       {
         title:'初中',
         id:'chuzhong'
       },
       {
         title:'小升初',
         id:'xiaoshengchu'
       },
       {
         title:'高中',
         id:'gaozhong'
       }
       ]
   }
  },

  /**
   * 组件的初始数据
   */
  data: {
  choiceId:'tuijian'
  },

  /**
   * 组件的方法列表
   */
  methods: {
    whichOne:function(event)
    {
      // console.log('11')
      // console.log(event)
      var id=event.currentTarget.dataset.id
      //把id传给上层page
      // console.log('id'+id)
      this.setData({
        choiceId: id
      })
      this.triggerEvent('which',{id})
    
    }
  }
})
